import Vue from "vue";
import axios from "axios";
//import $ from 'jquery'
import BootStrap from "bootstrap/dist/js/bootstrap.min.js";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import layer from "vue-layer";
import echarts from "echarts";
import { get, post, put } from "./api/http";
import Vant from "vant";
import dataV from "@jiaminghi/data-view";
import { installResponseInterceptor } from "./utils/responseInterceptor";
import "vant/lib/index.css";
import store from "./store/index";
import Blob from "./excel/Blob.js";
import Export2Excel from "./excel/Export2Excel.js";
Vue.prototype.$http = axios;
import * as $api from "./api/api";
Vue.prototype.$api = $api;
Vue.prototype.$get = get;
Vue.prototype.$post = post;
Vue.prototype.$put = put;
Vue.prototype.$layer = layer(Vue);
//cnpm install --save vue-axios vue-jsonp vue-layer
Vue.config.productionTip = false;
Vue.prototype.$echarts = echarts;

Vue.use(ElementUI);
Vue.use(VueRouter);
Vue.use(BootStrap);
Vue.use(Vant);
Vue.use(dataV);
// 挂载路由导航守卫
// router.beforeEach((to, from, next) => {
// to 将要访问的路径
// from 代表从哪个路径跳转而来
// next 是一个函数，表示放行

// if (to.path === '/login') return next()
// // 获取token
// const tokenStr = window.sessionStorage.getItem('Token')
// if (!tokenStr) return next('/login')
// next()
// })
// 解密
installResponseInterceptor(Vue);

//实现打印
import Print from "vue-print-nb";
Vue.use(Print); //注册

//Vue.use($)
//App框架
import "bootstrap/dist/css/bootstrap.css";
import "./assets/app/css/bootstrap.min.css";
import "./assets/app/css/font-awesome.min.css";
// import './assets/app/css/healthSystem.css'
import "./assets/app/css/app.css";
import App from "./App.vue";
import VueRouter from "vue-router";
import router from "./router";

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
